public class Kaart{
   private char mast;
   private int v22rtus;
   public static final char[] mastid={'S', 'D', 'C', 'H'}; //poti ruutu risti ärtu
   public Kaart(char mast, int v22rtus){
      this.mast=mast;
	  this.v22rtus=v22rtus;
   }
   public char kysiMast(){return mast;}
   public int kysiV22rtus(){return v22rtus;}
   public String kysiMastiNimetus(){
     if(mast=='S'){return "poti";}
     if(mast=='D'){return "ruutu";}
     if(mast=='C'){return "risti";}
     if(mast=='H'){return "ärtu";}
	 return "Tundmatu mast "+mast;
   }
   public String kysiV22rtuseNimetus(){
     if(v22rtus<=10){return String.valueOf(v22rtus);}
	 if(v22rtus==11){return "soldat";}
	 if(v22rtus==12){return "emand";}
	 if(v22rtus==13){return "kuningas";}
	 if(v22rtus==14){return "äss";}
	 return "Tundmatu väärtus "+v22rtus;
   }
   public String toString(){
      return kysiMastiNimetus()+" "+kysiV22rtuseNimetus();
   }   
}
